﻿namespace SLClient.ServiceAPI
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.Serialization;
    using System.Threading;

    [DataContract(Name="AppBank", Namespace="http://schemas.datacontract.org/2004/07/SLClient"), GeneratedCode("System.Runtime.Serialization", "4.0.0.0"), DebuggerStepThrough]
    public class AppBank : INotifyPropertyChanged
    {
        private int? BankIdField;
        private string BankNumberField;
        private string BankUserNameField;
        private Guid IdField;
        private PropertyChangedEventHandler _PropertyChanged;
        private bool? StateField;

        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Combine(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
            remove
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Remove(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
        }

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember(Order=1)]
        public int? BankId
        {
            get
            {
                return this.BankIdField;
            }
            set
            {
                if (!this.BankIdField.Equals(value))
                {
                    this.BankIdField = value;
                    this.RaisePropertyChanged("BankId");
                }
            }
        }

        [DataMember(Order=2)]
        public string BankNumber
        {
            get
            {
                return this.BankNumberField;
            }
            set
            {
                if (!object.ReferenceEquals(this.BankNumberField, value))
                {
                    this.BankNumberField = value;
                    this.RaisePropertyChanged("BankNumber");
                }
            }
        }

        [DataMember(Order=3)]
        public string BankUserName
        {
            get
            {
                return this.BankUserNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.BankUserNameField, value))
                {
                    this.BankUserNameField = value;
                    this.RaisePropertyChanged("BankUserName");
                }
            }
        }

        [DataMember]
        public Guid Id
        {
            get
            {
                return this.IdField;
            }
            set
            {
                if (!this.IdField.Equals(value))
                {
                    this.IdField = value;
                    this.RaisePropertyChanged("Id");
                }
            }
        }

        [DataMember(Order=4)]
        public bool? State
        {
            get
            {
                return this.StateField;
            }
            set
            {
                if (!this.StateField.Equals(value))
                {
                    this.StateField = value;
                    this.RaisePropertyChanged("State");
                }
            }
        }
    }
}

